﻿<sap:ActivityDesigner x:Class="BioWF.Activities.Design.LoadSequencesFromFileDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    xmlns:converters="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
    xmlns:system="clr-namespace:System;assembly=mscorlib">

    <sap:ActivityDesigner.Icon>
        <DrawingBrush>
            <DrawingBrush.Drawing>
                <ImageDrawing>
                    <ImageDrawing.Rect>
                        <Rect Location="0,0" Size="16,16" ></Rect>
                    </ImageDrawing.Rect>
                    <ImageDrawing.ImageSource>
                        <BitmapImage UriSource="Images/load_sequences.png" />
                    </ImageDrawing.ImageSource>
                </ImageDrawing>
            </DrawingBrush.Drawing>
        </DrawingBrush>
    </sap:ActivityDesigner.Icon>

    <StackPanel>
        <StackPanel.Resources>
            <converters:ArgumentToExpressionConverter x:Key="argToExpression" />
            <Style TargetType="TextBlock">
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="Margin" Value="5" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </StackPanel.Resources>

        <TextBlock Text="Filename" />
        <DockPanel>
            <Button Content="..." Padding="5,2" Margin="5" DockPanel.Dock="Right" Click="OnFindFile" />
            <sapv:ExpressionTextBox Margin="5" 
                                    OwnerActivity="{Binding ModelItem}"
                                    ExpressionType="system:String"
                                    Expression="{Binding ModelItem.Filename, Mode=TwoWay, Converter={StaticResource argToExpression}, ConverterParameter=In}" />
        </DockPanel>
        
        <TextBlock Text="Desired Alphabet (Optional)" />
        <ComboBox x:Name="cbAlphabet" Margin="5" 
                    DisplayMemberPath="Item1"
                    SelectedValuePath="Item2"
                    SelectedValue="{Binding ModelItem.DesiredAlphabet, Mode=TwoWay}" />

        <CheckBox IsChecked="{Binding ModelItem.LogOutput, Mode=TwoWay}" Content="Log Progress" FontWeight="Bold" Margin="5" />
        
    </StackPanel>

</sap:ActivityDesigner>
